// import fsPromises from 'fs/promises'
import fse from "fs-extra";

const configJson = await fse.readJsonSync("./config.json", { throws: false });

const config = { page: 1, pageIndex: 0, ...configJson };

export const saveConfig = () => {
  fse.writeJSONSync("./config.json", config);
};

export default config;
